﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;



public class FloatingTextManager : MonoBehaviour
{
    public static FloatingTextManager Instance;
    public GameObject floatingTextPrefab;
    // Start is called before the first frame update
    void Awake()
    {
        Instance = this;
    }

    // Update is called once per frame
    void Update()
    {
        
    }


    public static FloatingText SpawnText(Vector3 position)
    {
        GameObject obj = Instantiate(Instance.floatingTextPrefab, position, Quaternion.identity, Instance.transform);
        return obj.GetComponent<FloatingText>();
    }
}
